begintalkscript;

variables;

begintalknode 1;
state = -1;
nextstate = 2;
question = "Rolar-Tel";
text1 = "You're standing in front of an impressive looking Vahnatai. Judging from the training equipment";
text2 = "he has in his room, he probably does a lot of physical exercise, as well as the Vahnatai mental exercises.";

begintalknode 2;
state = 2;
nextstate = -1;
question = "Why is there fighting going on in this tower?";
text1 = "_My... MOTHER... left some troops loyal to her behind. They did not surrender, so we have no choice but to";
text2 = "eliminate them ourselves, and take back this tower. Be warned, while my men will not harm you, the undead";
text3 = "that my mother left behind will. I hope that you do not die._ Rolar-Tel smiles warmly.";

begintalknode 3;
state = 2;
nextstate = -1;
question = "Why do you want to help us?";
text1 = "_I have already given you the answer to this. The war against your people is meaningless._";
text2 = "_It only contaminates the Vahnatai. I cannot allow that to happen anymore. Rentar-Ihrno broke many laws._";
text3 = "_Such, as the laws of succession, for example. I am only a Tel of our race. There are many Ihrnos about._";
text4 = "_But she decided that I should be leader of the Vahnatai once she was gone._ he sighs.";
text5 = "_Obviously she didn't expect me to try to make peace with humans. She believed that I was a firm supporter of her cause._";
text6 = "_It was safer that way, anyone who did not agree with her was killed, or exiled, or worse._";
text7 = "You may have already found this out, but some of the exiled lords became bandits._";
text8 = "They have a small base near the trees. You may also reach it by travelling past the great Vahnatai Spiral. Good luck!_";

begintalknode 4;
state = 2;
condition = get_flag(25,17) == 0);
nextstate = -1;
question = "Are there any quests and such that I can do for you?";
text1 = "_Perhaps. There is a Vahnvoi Torturer in the cellars. Eliminate it, and I will reward you well._";
code = toggle_quest(3,1);
break;

begintalknode 6;
state = 2;
nextstate = 3;
question = "How do I leave the Tower?";
text1 = "_By opening the Portcullises to the great Vahnatai Spiral, which leads to your lands._";

begintalknode 11;
state = 3;
nextstate = -1;
question = "How do I do open the Portcullises?";
text1 = "_The control room is in the cellars. Pull the levers to open or close the Tower's Gates._";

begintalknode 5;
state = 2;
condition = get_flag(25,17) == 1);
nextstate = -1;
question = "I have killed the beast for you.";
text1 = "_You have done your part, and I will do mine._ (he waves an arm over you, and you all feel much brighter!)";
code = toggle_quest(3,0);
       toggle_quest(4,1);
       set_flag(25,17,2);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       award_party_xp(2500,25);
       break;

begintalknode 7;
state = 2;
condition = get_flag(25,17) == 2;
nextstate = -1;
question = "The Undead has been killed";
text1 = "_Yes, I already know. And you have already been rewarded. Now go and warn the Empire of this attack!_";

begintalknode 8;
state = 2;
nextstate = 13;
question = "Is there anything you can teach us?";
text1 = "Rolar-Tel looks surprised. _Why, yes, I believe I can teach you a few spells. However, it cannot come cheap, else you would learn all I have to teach, and then be VERY powerful. Okay?";

begintalknode 9;
state = 13;
nextstate = -1;
question = "Okay. Teach away!";
text1 = "Rolar-Tel looks sorry, but adamant. _I am sorry, but I cannot let you learn Vahnatai secrets. I'm very sorry. I hope you'll understand that that's all I can teach._";
code =
begin_shop_mode("Rolar Tel's Skills","Rolar-Tel is a Vahnatai Lord, and can teach many spells, but at a high cost. Perhaps you want to read his library before buying spells?",10,5,-1);
break;